#include <stdio.h>

int add(int x, int y);

int main()
{
	int a = 5, b = 6;

	add(a, b);

	return 0;
}

int add(int x, int y)
{
	return x + y;
}

#if 0

/*
 * intel
 */
0000000000001129 <main>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	48 83 ec 10          	sub    $0x10,%rsp
    1135:	c7 45 f8 05 00 00 00 	movl   $0x5,-0x8(%rbp)
    113c:	c7 45 fc 06 00 00 00 	movl   $0x6,-0x4(%rbp)
    1143:	8b 55 fc             	mov    -0x4(%rbp),%edx	// 0x6
    1146:	8b 45 f8             	mov    -0x8(%rbp),%eax	// 0x5
    1149:	89 d6                	mov    %edx,%esi
    114b:	89 c7                	mov    %eax,%edi
    114d:	e8 07 00 00 00       	callq  1159 <add>	// add(0x5, 0x6)
    1152:	b8 00 00 00 00       	mov    $0x0,%eax
    1157:	c9                   	leaveq 
    1158:	c3                   	retq   

0000000000001159 <add>:
    1159:	f3 0f 1e fa          	endbr64 
    115d:	55                   	push   %rbp
    115e:	48 89 e5             	mov    %rsp,%rbp
    1161:	89 7d fc             	mov    %edi,-0x4(%rbp)
    1164:	89 75 f8             	mov    %esi,-0x8(%rbp)
    1167:	8b 55 fc             	mov    -0x4(%rbp),%edx
    116a:	8b 45 f8             	mov    -0x8(%rbp),%eax
    116d:	01 d0                	add    %edx,%eax
    116f:	5d                   	pop    %rbp
    1170:	c3                   	retq   
    1171:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    1178:	00 00 00 
    117b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

/*
 * arm
 */
000000000040051c <main>:
  40051c:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400520:	910003fd 	mov	x29, sp
  400524:	528000a0 	mov	w0, #0x5                   	// #5
  400528:	b9001fa0 	str	w0, [x29, #28]
  40052c:	528000c0 	mov	w0, #0x6                   	// #6
  400530:	b9001ba0 	str	w0, [x29, #24]
  400534:	b9401ba1 	ldr	w1, [x29, #24]
  400538:	b9401fa0 	ldr	w0, [x29, #28]
  40053c:	94000004 	bl	40054c <add>
  400540:	52800000 	mov	w0, #0x0                   	// #0
  400544:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400548:	d65f03c0 	ret

000000000040054c <add>:
  40054c:	d10043ff 	sub	sp, sp, #0x10
  400550:	b9000fe0 	str	w0, [sp, #12]
  400554:	b9000be1 	str	w1, [sp, #8]
  400558:	b9400fe1 	ldr	w1, [sp, #12]
  40055c:	b9400be0 	ldr	w0, [sp, #8]
  400560:	0b000020 	add	w0, w1, w0
  400564:	910043ff 	add	sp, sp, #0x10
  400568:	d65f03c0 	ret
  40056c:	00000000 	.inst	0x00000000 ; undefined

#endif
